package cn.edu.scau.cmi.wangjushen.singleton;

public class Chairman {
	private static Chairman chairman;
	private String name;
	
	private Chairman(String name) {
		this.name = name;
	}
	
	public static Chairman getInstance(String name) {
		if (!name.equals("")) {
			if(chairman == null) {
				System.out.println("in");
				chairman = new Chairman(name);
				return chairman;
			}
			else {
				return chairman;
			}
		}
		else {
			return null;
		}
	}

	public String getName() {
		return name;
	}	
}
